// 作息时间，在生成课表的时候用到
class RestTime {
    int startHour = 0
    int endHour = 0
    int startMinute = 0
    int endMinute = 0
    int unitTime = 0
    School school
    static constraints = {
        startHour(nullable:false,range:0..23)
        endHour(nullable:false,range:0..23)
        startMinute(nullable:false,range:0..59)
        endMinute(nullable:false,range:0..59)
        unitTime()
        school(nullable:false)
    }

    static mapping = {
       table 'xedu_rest_time'       
    }

    String toString (){
        "${startHour}:${startMinute}-${endHour}:${endMinute}"
    }
}
